package com.e5.dao.imp;

import java.util.List;
import java.util.Scanner;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.e5.training.dao.UserDao;
import com.e5.training.domain.User;

public class RaulTestUserDaoImpListAllUser {
	@Test
	public void testAddUser() {
		ApplicationContext ctx = new ClassPathXmlApplicationContext(
				"test-applicationContext.xml");
		User user = new User();
		UserDao userDao = (UserDao) ctx.getBean("userDao");

		try {
			List<User> userlist = userDao.listAllUser();
			for(User o : userlist){
				System.out.println(o.getUserID());
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
